-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CVL Changes #3: Multi-db instance support #20
CVL Changes #3: Multi-db instance support #20
Conversation
//In absence of the file, it uses default config for CONFIG_DB | ||
//so that CVL UT will pass in development environment. | ||
func dbCfgInit() { | ||
defaultDBConfig := `{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use sonic_db_config/db_config.go ?
We could move that to here and update as needed. So we can have all the APIs that parse and use this file, in one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought of so, but wanted keep CVL as independent of telemetry package.
Are you suggesting to import "sonic-telemetry/dbconfig" in this file and create a wrapper layer for any additional logic ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to keep the common stuff in one place, so everyone shares the updated code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renuka, we cannot do that as telemetry code today is dependent on mgmt-common and CVL resides inside the mgmt-common. We need to do the other way around all the telemetry DB access stuff move to mgmt-common to make everything reside in a common place.
Adding multi-db instance support based on db config file.
So, now instead of hardcoded DB endpoint, it is read from a configuration file.